import http from "@/utils/request"
import axios from "axios"
// console.dir(http)
//获取验证码

export const getCaptchaApi = () => http.get('/users/getCaptcha?v=next')

//校验验证码

export const verifyCaptchaApi = captcha => http.get('/users/verifyCaptcha', {
    params: {
        captcha
    }
})

//用户名登入

export const commonLoginApi = (username, password) => http.post('/users/login', {
    username,
    password
})

//短信登入

export const smsLoginApi = (code) => http.post('/users/login?type=sms', { code })

//获取短信验证码

export const getSmsCodeApi = phoneNumber => http.post('/sms/send', { phoneNumber })